package practice.w912;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionDemo3 {
    public static void main(String[] args) {
        Collection c = new ArrayList();
        Point p1 = new Point(1,2);
        c.add(p1);
        System.out.println(p1);
        System.out.println(c);

        p1.setX(100);
        System.out.println(p1);
        System.out.println(c);

//        Collection c = new ArrayList();
//        Point p1 = new Point(1,2);
//        c.add(p1);
//        System.out.println(p1);
//        System.out.println(c);
//
//        p1.setX(100);
//        System.out.println(p1);
//        System.out.println(c);
//

    }
}
